#!/usr/bin/env python3

# -*- coding: utf-8 -*-

# @author: zhangbo

# @time: 2025/3/3 11:21

import os


def get_project_name():
    """
    项目目录
    :return:
    """

    project_name = "Ui_Auto_Test"
    path = os.path.abspath(__file__)
    path = path[:path.find(project_name) + len(project_name)]

    return path


def sep(path: list, add_sep_befor=False, add_sep_after=False):
    """
    路径拼接
    :param path:
    :return:
    """
    abs_path = os.sep.join(path)
    if add_sep_befor:
        abs_path = os.sep + abs_path
    elif add_sep_after:
        abs_path = abs_path + os.sep
    return abs_path

